package com.pocket.insight.base.sql.visitor.common;

import com.alibaba.druid.sql.ast.statement.SQLExprTableSource;
import com.alibaba.druid.sql.visitor.SQLASTVisitorAdapter;
import com.pocket.insight.base.sql.visitor.oracle.AddDbPrefixVisitor;

/**
 * 描述：
 *
 * @author shuize
 * @create 2024/12/14
 */
public class AddDbPrefixCommonVisitor extends SQLASTVisitorAdapter implements AddDbPrefixVisitor {
    private String tablePrefix;

    public AddDbPrefixCommonVisitor(String tablePrefix) {
        this.tablePrefix = tablePrefix;
    }

    @Override
    public boolean visit(SQLExprTableSource x) {
        return this.visitAndAddDbPrefix(x, this.tablePrefix);
    }
}
